package com.woniuxy.community_life.mapper;

import com.woniuxy.community_life.pojo.Like;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface LikeMapper {
    int deleteByPrimaryKey(Integer lId);

    int insert(Like record);

    int insertSelective(Like record);

    Like selectByPrimaryKey(Integer lId);

    int updateByPrimaryKeySelective(Like record);

    int updateByPrimaryKey(Like record);
    @Select("select * from t_like where d_id=#{dId} and flag=0 ")
    List<Like> selectBydId(Integer dId);
    @Select("select * from t_like where d_id=#{dId} and flag=0 and a_id=#{aId}")
    Like selectBydIdAndaId(@Param("dId") Integer dId, @Param("aId") Integer aId);
}